<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateManagersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('managers', function (Blueprint $table) {
            $table->id();
            $table->unsignedInteger('department_id')->default(0)->comment('部门Id');
            $table->unsignedInteger('post_id')->default(0)->comment('职务Id');
            $table->string('phone',11)->nullable()->comment('手机号');
            $table->string('password')->nullable()->comment('密码');
            $table->string('openid')->nullable()->comment('用户openid');
            $table->string('nick_name')->nullable()->comment('姓名');
            $table->string('mobile')->nullable()->comment('联系方式');
            $table->string('username')->nullable()->comment('用户账户');


            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('managers');
    }
}
